The data and R scripts in this archive can be used to replicate all empirical results presented in “Mobile internet and the quality of elections in low income democracies”. 

There are three files to re-create results from the main text, which focus on:
a) Background figures “background_info.R” 
b) Difference-in-differences analyses in Presidential elections “DiD_main_text.R”
c) Afrobarometer analyses to validate coverage and test party contact “Afrobarometer (main text).R” 

There are four files to re-create results from the supplementary materials, each corresponding to each section 1-4. These are:
a) “SM1 (data description).R”
b) “SM2 (DiD).R”
c) “SM3 (Afrobarometer).R”
d) “SM4 (qualitative).R”

The main dataset files are:
 1. “AB_malawi.rds” - data from round 8 of the Afrobarometer survey in Malawi, which can be downloaded from https://www.afrobarometer.org/data/data-sets/
 2. “did_election_data_pres.rds” - panel dataset of polling station election returns for the 2014 and 2019 Presidential elections, with variable “inside” indicating whether a station is inside 3G coverage and “weights” being the weights used in matching specifications. This data is sufficient to recreate the DiD analyses presented in the main text.
 3. “did_election_data_full.rds” - panel dataset of polling station election returns for the 2014 and 2019 elections, covering Presidential, Parliamentary, and local council races, with variable “inside” indicating whether a station is inside 3G coverage and “weights” being the weights used in matching specifications. Note that ballot rejection outcomes are only available for the Presidential election. This data is required to recreate additional DiD analyses presented in section 2 of the supplementary materials.
 4. “ward_coverage.RData” - four separate panel datasets of polling station election returns for the Presidential elections, each using a different percentage cut-off of ward-level coverage to fill in missing data. This data is required to recreate ward-interpolated DiD analyses presented in section 2 of the supplementary materials.

All other datasets correspond to background figures and can be used to re-create them, but do not form part the core empirical analyses.

Lastly, the analysis uses restricted-access mobile coverage data to calculate whether polling stations are located inside 3G coverage. Information about acquiring access to this dataset, and the specific files used, can be found in section 1 of the supplementary materials.




